#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "databaseipdialog.h"
#include "databaseinstancemngr.h"
#include "qmysqldabasemngr.h"

namespace Ui {
    class MainWindow;
}


class QTabExtWidget;
class ErrorCodesWidget;
class ErrorCodesView;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
public slots:
/********** Menu signals *******************************/
    void signalLoginDataBase();
    void signalExit();
    void signalOpenErrorCodeViewTable();
    void signalOpenErrorCodeEditTable();
    void signalDbLoginAccept(db_connect);
/*******************************************************/

signals:

protected:
    void initTabWidget();
    void initMenu();
    void initToolBar();

    bool openDatabase(DatabaseManager *pDBManager, const db_connect &dbConnect);

private:
    Ui::MainWindow       *ui;
    QTabExtWidget        *centralWidget;
    ErrorCodesView       *pErrorCodesEditWidget;
    ErrorCodesView       *pErrorCodesViewWidget;
    DatabaseIpDalog      *pDatabaseIpDalog;
};

#endif // MAINWINDOW_H
